package com.example.springmvcproject.Vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CreditSelectiveVo {
    /**
     * 还款时间还是创建时间
     */
    @Pattern(regexp = "createTime|repayTime")
    private String timeType;
    /**
     * 开始时间
     */
    private Long startTime;
    /**
     * 结束时间
     */
    private Long endTime;
    /**
     * 搜索类型
     */
    @Pattern(regexp = "remarks|num")
    private String searchType;
    /**
     * 搜索内容
     */
    @Size(min = 1,max = 30,message = "搜索字符请在1~30之间")
    private String searchText;
    /**
     * 页码
     */
    private Integer pageIndex = 0;
    /**
     * 页面大小
     */
    private Integer pageSize = 10;

    /**
     * 还款状态
     */
    @Range(min=0,max = 1,message = "只允许0，1")
    private Integer status;
}
